Favicon

You are here: Home > API Reference > App Distribution > Application Notifications > Create new notification

Create new notification

Required Permission: mad.application.notification.create

Create new notification

POST
https://api.applivery.io/v1/organizations/{organizationId}/apps/{applicationId}/notifications
curl -X POST "https://api.applivery.io/v1/organizations/{organizationId}/apps/{applicationId}/notifications" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "slack",
  "events": {
    "buildCreated": true,
    "buildProcessed": true,
    "feedbackCreated": true,
    "certificateWillExpire": true
  },
  "description": "string",
  "setup": {
    "slack": {},
    "webhook": {}
  }
}'
const response = await fetch("https://api.applivery.io/v1/organizations/{organizationId}/apps/{applicationId}/notifications", {
  method: "POST",
  headers: {
    Authorization: "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "type": "slack",
    "events": {
      "buildCreated": true,
      "buildProcessed": true,
      "feedbackCreated": true,
      "certificateWillExpire": true
    },
    "description": "string",
    "setup": {
      "slack": {},
      "webhook": {}
    }
  }),
});

const data = await response.json();
import requests

response = requests.post(
    "https://api.applivery.io/v1/organizations/{organizationId}/apps/{applicationId}/notifications",
    headers={"Authorization": "Bearer <YOUR_API_KEY>"},
    json={
      "type": "slack",
      "events": {
        "buildCreated": true,
        "buildProcessed": true,
        "feedbackCreated": true,
        "certificateWillExpire": true
      },
      "description": "string",
      "setup": {
        "slack": {},
        "webhook": {}
      }
    },
)

data = response.json()

Request

Send your API key in the request header authorization
Example: Authorization: Bearer <token>

organizationId string
required
Match pattern: ^(([a-fA-F0-9]{24})|([a-zA-Z0-9\\-]{3,}))$
applicationId string
required
Match pattern: ^(([a-fA-F0-9]{24})|([a-zA-Z0-9\\-]{3,}))$

Body Params application/json
type string required
slack webhook
events object optional
buildCreated boolean optional
buildProcessed boolean optional
feedbackCreated boolean optional
certificateWillExpire boolean optional
description string optional
≤ 128 characters
setup object optional
slack object optional
code string required
≤ 256 characters
redirectUri string required
≤ 256 characters
webhook object optional
url string required
≤ 256 characters
{
    "type": "slack",
    "events": {
        "buildCreated": true,
        "buildProcessed": true,
        "feedbackCreated": true,
        "certificateWillExpire": true
    },
    "description": "string",
    "setup": {
        "slack": {
            "code": "string",
            "redirectUri": "string"
        },
        "webhook": {
            "url": "string"
        }
    }
}

Responses

200 Response application/json
status boolean optional
data object optional
id string optional
Match pattern: ^[a-fA-F0-9]{24}$
organization string optional
Match pattern: ^[a-fA-F0-9]{24}$
application string optional
Match pattern: ^[a-fA-F0-9]{24}$
description string optional
≤ 128 characters
type string optional
slack webhook
config object optional
slack object optional
webhook object optional
events object optional
buildCreated boolean optional
buildProcessed boolean optional
feedbackCreated boolean optional
certificateWillExpire boolean optional
updatedAt string optional
Format: date-time
createdAt string optional
Format: date-time
{
    "status": true,
    "data": {
        "id": "string",
        "organization": "string",
        "application": "string",
        "description": "string",
        "type": "slack",
        "config": {
            "slack": {
                "team": "string",
                "channel": "string"
            },
            "webhook": {
                "url": "string",
                "token": "string"
            }
        },
        "events": {
            "buildCreated": true,
            "buildProcessed": true,
            "feedbackCreated": true,
            "certificateWillExpire": true
        },
        "updatedAt": "2024-01-01T00: 00:00Z",
        "createdAt": "2024-01-01T00: 00:00Z"
    }
}
401 Response application/json
status boolean optional
false
error object optional
code number optional
4004
message string optional
Invalid Token
{
    "status": false,
    "error": {
        "code": 4002,
        "message": "No auth token"
    }
}
404 Response application/json
status boolean optional
false
error object optional
code number optional
3001
message string optional
Entity not found
{
    "status": false,
    "error": {
        "code": 3001,
        "message": "Entity not found"
    }
}